package com.aspose.cells;

class zcdi {
   static zayy a(byte[] var0, int var1, zoz var2) throws Exception {
      boolean var3 = (var0[var1] & 255 & 1) != 0;
      boolean var4 = (var0[var1] & 255 & 2) != 0;
      ++var1;
      String var5 = null;
      int[] var6 = new int[]{var1};
      var5 = zcch.a(var0, var6);
      var1 = var6[0];
      byte[] var16 = null;
      zatu var7 = null;
      Object var8 = null;
      int var11;
      int var12;
      if (var3) {
         int var9 = com.aspose.cells.b.a.zc.a(var0, var1);
         var16 = new byte[var9 * 4];
         var1 += 4;

         for(int var10 = 0; var10 < var9; ++var10) {
            System.arraycopy(var0, var1, var16, var10 * 4, 4);
            var11 = com.aspose.cells.b.a.zc.e(var0, var1 + 2) & '\uffff';
            if (var11 < var2.d().size()) {
               var12 = (Integer)var2.d().get(var11);
               System.arraycopy(com.aspose.cells.b.a.zc.a(var12), 0, var16, var10 * 4 + 2, 2);
            }

            var1 += 4;
         }
      }

      if (var4) {
         var7 = new zatu();
         var7.c = new zatt();
         int[] var17 = new int[]{var1};
         String var18 = zcch.a(var0, var17);
         var1 = var17[0];
         var11 = com.aspose.cells.b.a.zc.a(var0, var1);
         var1 += 4;

         for(var12 = 0; var12 < var11; ++var12) {
            zats var13 = new zats();
            int var14 = com.aspose.cells.b.a.zc.e(var0, var1) & '\uffff';
            int var15;
            if (var1 + 12 < var0.length) {
               var13.c = var18.substring(var14);
            } else {
               var15 = com.aspose.cells.b.a.zc.e(var0, var1 + 12) & '\uffff';
               var13.c = var18.substring(var14, var14 + var15 - var14 + 1);
            }

            var13.a = com.aspose.cells.b.a.zc.e(var0, var1 + 2) & '\uffff';
            var13.b = com.aspose.cells.b.a.zc.e(var0, var1 + 4) & '\uffff';
            if (var12 == 0) {
               var15 = com.aspose.cells.b.a.zc.e(var0, var1 + 6) & '\uffff';
               if (var15 < var2.d().size()) {
                  var15 = (Integer)var2.d().get(var15);
               }

               var7.b = var15;
               var7.a = var0[var1 + 8];
            }

            var1 += 12;
         }
      }

      if (var7 != null) {
         var8 = new zatv(var5, var16, var7);
      } else if (var16 != null) {
         var8 = new zbap(var5, var16, 0);
      } else {
         var8 = new zayy(var5, 0);
      }

      return (zayy)var8;
   }
}
